home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / sysproc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-15  |  2.8 KB  |  111 lines

  1. /*
  2.    Copyright (C) 1995 Amdahl Corporation.
  3.  
  4. This file is part of XEmacs.
  5.  
  6. XEmacs is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by the
  8. Free Software Foundation; either version 2, or (at your option) any
  9. later version.
  10.  
  11. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with XEmacs; see the file COPYING.  If not, write to the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifdef HAVE_VFORK_H
  21. # include <vfork.h>
  22. #endif
  23.  
  24. #include "systime.h" /* necessary for sys/resource.h; also gets the
  25.             FD_* defines on some systems. */
  26. #include <sys/resource.h>
  27.  
  28. #if !defined (NO_SUBPROCESSES)
  29.  
  30. #ifdef HAVE_SOCKETS    /* TCP connection support, if kernel can do it */
  31. # include <sys/socket.h>
  32. # include <netdb.h>
  33. # include <netinet/in.h>
  34. # include <arpa/inet.h>
  35. #elif defined (SKTPAIR)
  36. # include <sys/socket.h>
  37. #endif /* HAVE_SOCKETS */
  38.  
  39. /* TERM is a poor-man's SLIP, used on Linux.  */
  40. #ifdef TERM
  41. # include <client.h>
  42. #endif
  43.  
  44. /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */
  45. #ifdef HAVE_BROKEN_INET_ADDR
  46. # define IN_ADDR struct in_addr
  47. # define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
  48. #else
  49. # if (LONGBITS > 32)
  50. #  define IN_ADDR unsigned int
  51. # else
  52. #  define IN_ADDR unsigned long
  53. # endif
  54. # define NUMERIC_ADDR_ERROR (numeric_addr == (IN_ADDR) -1)
  55. #endif
  56.  
  57. /* Define first descriptor number available for subprocesses.  */
  58. #ifdef VMS
  59. # define FIRST_PROC_DESC 1
  60. #else /* Not VMS */
  61. # define FIRST_PROC_DESC 3
  62. #endif
  63.  
  64. #ifdef IRIS
  65. # include <sys/sysmacros.h>    /* for "minor" */
  66. #endif /* not IRIS */
  67.  
  68. #endif /* !NO_SUBPROCESSES */
  69.  
  70. #ifdef AIX
  71. #include <sys/select.h>
  72. #endif
  73.  
  74. #ifdef FD_SET
  75.  
  76. /* We could get this from param.h, but better not to depend on finding that.
  77.    And better not to risk that it might define other symbols used in this
  78.    file.  */
  79. # ifdef FD_SETSIZE
  80. #  define MAXDESC FD_SETSIZE
  81. # else
  82. #  define MAXDESC 64
  83. # endif /* FD_SETSIZE */
  84. # define SELECT_TYPE fd_set
  85.  
  86. #else /* no FD_SET */
  87.  
  88. # define MAXDESC 32
  89. # define SELECT_TYPE int
  90.  
  91. /* Define the macros to access a single-int bitmap of descriptors.  */
  92. # define FD_SET(n, p) (*(p) |= (1 << (n)))
  93. # define FD_CLR(n, p) (*(p) &= ~(1 << (n)))
  94. # define FD_ISSET(n, p) (*(p) & (1 << (n)))
  95. # define FD_ZERO(p) (*(p) = 0)
  96.  
  97. #endif /* no FD_SET */
  98.  
  99. #ifdef EMACS_BTL
  100. extern int cadillac_stop_logging ();
  101. extern int cadillac_start_logging ();
  102. #endif
  103.  
  104. #ifdef ENERGIZE
  105. extern Lisp_Object energize_get_buffer_process (Lisp_Object);
  106. extern Lisp_Object Fenergize_user_input_buffer_mark (Lisp_Object);
  107. extern Lisp_Object Venergize_process;
  108. #endif
  109.  
  110. extern int poll_fds_for_input (SELECT_TYPE mask);
  111.